package com.gengine.ui
{
	import com.gengine.global.*;
	import flash.display.*;
	import flash.events.*;
	
	public class Application extends Sprite
	{
		
		public function Application()
		{
			if (stage)
			{
				this.init();
			}
			else
			{
				this.addEventListener(Event.ADDED_TO_STAGE, this.init);
			}
		}
		
		private function init(event:Event = null) : void
		{
			Global.instance.initStage(this.stage);
			this.initApp();
		}
		
		protected function initApp() : void
		{
			
		}
	}
}
